Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor e2e tests setup #491

Merged
merged 33 commits into from
Jan 7, 2025
Merged

Refactor e2e tests setup #491

merged 33 commits into from
Jan 7, 2025

Conversation

yivlad
Copy link
Contributor

@yivlad yivlad commented Dec 13, 2024

Closes FRO-1189

Copy link

vercel bot commented Dec 13, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
app-storybook ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 7, 2025 4:44pm
spark-app-production ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 7, 2025 4:44pm
spark-app-staging ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 7, 2025 4:44pm

Copy link

github-actions bot commented Dec 13, 2024

📦 Size Report

Path Size Diff
JS 1.3 MB 67 B (+0.01% 🔺)
CSS 23.29 KB 0 B (0%)

packages/app/src/test/e2e/testnet-cache.ts Outdated Show resolved Hide resolved
packages/app/src/test/e2e/setup.ts Outdated Show resolved Hide resolved
packages/app/src/test/e2e/setup.ts Outdated Show resolved Hide resolved
packages/app/src/test/e2e/setup.ts Outdated Show resolved Hide resolved
packages/app/src/test/e2e/setup.ts Outdated Show resolved Hide resolved
progressSimulationAndMine: ProgressSimulation
}

export type TestContext<T extends ConnectionType> = (T extends 'not-connected' ? {} : { account: Address }) & {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IMO i would make account optional here and simplify this type 🤷 . Generics are kinda PITA to pass around and this type is used in PageObjects etc.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's kinda convenient that if you need an address you don't have to make an assertion. What about making T equal not-connected by default? As in here 53a3a24

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's kinda convenient that if you need an address you don't have to make an assertion.

But you need to make sure to pass appropriate generic type, no? Doesn't it result in some hard cast? or some other "unsafenest"? But I defer to your opinion here because you actually used this type xD

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants